package com.juzipi.demo.security;

public class MyUserDetailsService {

    //        ArrayList<GrantedAuthority> authorities = new ArrayList<>();
    //根据查询出的用户的roleId查询出他的role集合
//        List<Role> roles = roleMapper.selectList(new QueryWrapper<Role>().lambda().eq(Role::getId, user.getRoleId()));
//        if (StringUtils.isNotEmpty(roles)){
//            roles.forEach(role -> {
//                //遍历role取出roleCode,传入SimpleGrantedAuthority
//                SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getRoleCode());
//                authorities.add(authority);
//            });
//        }
}
